﻿<UserControl x:Class="EasyInvoice.WPF.Content.Client"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:common="clr-namespace:EasyInvoice.WPF.Common" 
             >
    <UserControl.Resources>
        <common:BinaryImageConverter x:Key="BinaryImageConverter"/>
    </UserControl.Resources>
    <ScrollViewer Margin="{StaticResource RootMargin}">
        <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
                <StackPanel.Resources>
                    <Style TargetType="StackPanel">
                        <Setter Property="Orientation" Value="Horizontal" />
                        <Setter Property="Margin" Value="0,0,0,4" />
                    </Style>
                    <Style TargetType="TextBlock">
                        <Setter Property="Width" Value="120" />
                        <Setter Property="VerticalAlignment" Value="Center" />
                    </Style>
                </StackPanel.Resources>
            <TextBlock Text="Client" Style="{StaticResource Title}" Margin="0,8,0,8"  />
            <StackPanel>
                    <TextBlock Text="Name"/>
                <TextBox  Width="350" Text="{Binding Name,Mode=TwoWay, ValidatesOnDataErrors=True}"/>
                </StackPanel>
                <StackPanel>
                    <TextBlock Text="Address"/>
                <TextBox  Width="350" Text="{Binding Address,Mode=TwoWay, ValidatesOnDataErrors=True}"/>
                </StackPanel>
                <StackPanel>
                    <TextBlock Text="Postal Code"/>
                <TextBox  Width="350" Text="{Binding PostalCode,Mode=TwoWay, ValidatesOnDataErrors=True}"/>
                </StackPanel>
                <StackPanel>
                    <TextBlock Text="City"/>
                <TextBox  Width="350" Text="{Binding City,Mode=TwoWay, ValidatesOnDataErrors=True}"/>
                </StackPanel>
                <StackPanel>
                    <TextBlock Text="State"/>
                <TextBox  Width="350" Text="{Binding State,Mode=TwoWay, ValidatesOnDataErrors=True}"/>
                </StackPanel>
                <StackPanel>
                    <TextBlock Text="Country"/>
                <TextBox  Width="350"   Text="{Binding Country,Mode=TwoWay, ValidatesOnDataErrors=True}"/>
                </StackPanel>
                <StackPanel>
                    <TextBlock Text="Phone Number"/>
                <TextBox  Width="350" Text="{Binding Phone,Mode=TwoWay, ValidatesOnDataErrors=True}"/>
                </StackPanel>
                <StackPanel>
                    <TextBlock Text="Email"/>
                <TextBox  Width="350" Text="{Binding Email,Mode=TwoWay, ValidatesOnDataErrors=True}"/>
                </StackPanel>
                <StackPanel>
                <TextBlock Text="Can Issue Invoices"/>
                    <CheckBox  Width="350" IsChecked="{Binding IsMaster,Mode=TwoWay}"/>
                </StackPanel>
            <StackPanel>
                <TextBlock Text="Signature" VerticalAlignment="Top"/>
                <DockPanel Width="306" MaxHeight="70">
                    <Image  Source="{Binding Signature, Converter={StaticResource BinaryImageConverter}}"/>
                </DockPanel>
                <Button Content="..." VerticalAlignment="Top" HorizontalAlignment="Right"/>
                
                
            </StackPanel>
            <StackPanel>
                <TextBlock/>
                <Button Command="{Binding ShowSaveCommand}" Content="save" Margin="0,32,0,8" Width="140"/>
            </StackPanel>
        </StackPanel>
        </ScrollViewer>
</UserControl>
